home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
PROGRAMR
/
CENVIW2.ZIP
/
BOOTED2.CMM
< prev
next >
Wrap
Text File
|
1993-09-14
|
1KB
|
29 lines
/************************************************************
*** BootEd2 - Sample Cmm code to demonstrate uses of the ***
*** spawn() function. ***
************************************************************/
#include <WinExec.lib>
#include <MsgBox.lib>
#include <WinUtil.lib>
MessageBox("This example CEnvi program will start\n"
"NotePad to edit both C:\\Config.sys and\n"
"C:\\Autoexec.bat, and then display them\n"
"both on the screen together. This example\n"
"is like BootEd1 but this uses spawn().",
"BootEd2 - Description");
// start up two versions of notepad with the two files we care about
Config = spawn(P_NOWAIT,"NotePad.exe"," c:\\Config.sys");
AutoExec = spawn(P_NOWAIT,"NotePad.exe","c:\\AutoExec.bat");
// position these two windows to fill the top-half and the bottom-half of
// the screen
ScreenWidth = GetSystemMetrics(SM_CXSCREEN);
ScreenHeight = GetSystemMetrics(SM_CYSCREEN);
MoveWindow(Config,0,0,ScreenWidth,ScreenHeight/2,True);
MoveWindow(AutoExec,0,ScreenHeight/2,ScreenWidth,ScreenHeight/2,True);